package com.lysj.bhp.coinexchange.repository;

import com.lysj.bhp.coinexchange.domain.BhpcRecord;
import com.lysj.bhp.coinexchange.vo.BhpcRecordVo;
import com.lysj.bhp.recharge.domain.RechargeRecord;
import com.lysj.bhp.withdraw.domain.WithDraw;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface BhpcRecordRepository extends JpaRepository<BhpcRecord, Long>, JpaSpecificationExecutor {

    List<BhpcRecord> findByUserId(Long userId);

    int countByUserIdAndType(Long userId,int type);

    List<BhpcRecord> findByUserIdOrderByCreateDateDesc(Long userId, Pageable pr);

    List<BhpcRecord> findByUserIdAndTypeOrderByCreateDateDesc(Long userId, int type, Pageable pr);

    List<BhpcRecord> findByUserIdAndTypeOrderByCreateDateDesc(Long userId, int type);

    List<BhpcRecord> findByUserIdAndTypeNotInOrderByCreateDateDesc(Long userId, int type,Pageable pr);



}
